package com.people.whx.demo.rocketmq;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Producer{

    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    public void sendMessage(Message message){
        rocketMQTemplate.convertAndSend("test-topic",message);
    }
}
